package com.lanou.musicbox.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class Mp3Info implements Parcelable{
    private long id;
    private long album_id;
    private String title; //歌曲名字
    private String artist;  //艺术家
    private long duration; //歌曲长度
    private long size; //歌曲大小
    private String url;  //歌曲链接
    private String album; //唱片图片链接
    private int isMusic;  //是否为音乐
    private boolean isFavorite = false;
    private int item_id; //点击后的位置
    private String songs_id;
    private String big_pic;
    private String small_pic;
    private String what_music;
    private String SongLrcLink;

    public String getSongLrcLink() {
        return SongLrcLink;
    }

    public void setSongLrcLink(String songLrcLink) {
        SongLrcLink = songLrcLink;
    }

    public static final Creator<Mp3Info> CREATOR = new Creator<Mp3Info>() {
        @Override
        public Mp3Info createFromParcel(Parcel in) {
            return new Mp3Info(in);
        }

        @Override
        public Mp3Info[] newArray(int size) {
            return new Mp3Info[size];
        }
    };

    public String getWhat_music() {
        return what_music;
    }

    public void setWhat_music(String what_music) {
        this.what_music = what_music;
    }

    public int getItem_id() {
        return item_id;
    }

    public void setItem_id(int item_id) {
        this.item_id = item_id;
    }

    public String getSongs_id() {
        return songs_id;
    }

    public void setSongs_id(String songs_id) {
        this.songs_id = songs_id;
    }

    public String getBig_pic() {
        return big_pic;
    }

    public void setBig_pic(String big_pic) {
        this.big_pic = big_pic;
    }

    public String getSmall_pic() {
        return small_pic;
    }

    public void setSmall_pic(String small_pic) {
        this.small_pic = small_pic;
    }




    protected Mp3Info(Parcel in) {
        id = in.readLong();
        album_id = in.readLong();
        title = in.readString();
        artist = in.readString();
        duration = in.readLong();
        size = in.readLong();
        url = in.readString();
        album = in.readString();
        isMusic = in.readInt();
        isFavorite = in.readByte() != 0;
    }



    public Mp3Info() {

    }

    public void setId(long id){
        this.id = id;
    }

    public long getId(){return this.id;}

    public void setTitle(String title){
        this.title = title;
    }

    public String getTitle(){return this.title;}

    public void setArtist(String artist){
        this.artist = artist;
    }

    public String getArtist(){return this.artist;}

    public void setDuration(long duration){this.duration = duration;}

    public long getDuration(){return this.duration;}

    public void setSize(long size){this.size = size;}

    public long getSize(){return this.size;}

    public void setUrl(String url){this.url = url;}

    public String getUrl(){return this.url;}

    public void setAlbum(String album){this.album = album;}

    public String getAlbum(){return this.album;}

    public void setAlbum_id(long album_id){this.album_id = album_id;}

    public long getAlbum_id(){return this.album_id;}

    public void setFavorite(boolean favorite){this.isFavorite =favorite;}

    public boolean getFavorite(){return isFavorite;}


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(id);
        dest.writeLong(album_id);
        dest.writeString(title);
        dest.writeString(artist);
        dest.writeLong(duration);
        dest.writeLong(size);
        dest.writeString(url);
        dest.writeString(album);
        dest.writeInt(isMusic);
        dest.writeByte((byte) (isFavorite ? 1 : 0));
        dest.writeInt(item_id);
        dest.writeString(songs_id);
        dest.writeString(big_pic);
        dest.writeString(small_pic);
        dest.writeString(what_music);
    }
}

